package com.hskn.hss.module.grid.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hskn.hss.core.domain.BaseEntity;
import com.hskn.hss.entity.TreeEntity;
import com.hskn.hss.exception.HssException;
import com.hskn.hss.module.grid.To.GridTo;
import com.hskn.hss.module.grid.entity.Grid;
import com.hskn.hss.module.grid.vo.GridMessageVo;
import com.hskn.hss.module.grid.vo.GridPlace;
import com.hskn.hss.module.grid.vo.GridVO;

import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author hskn
 * @since 2021-05-08
 */
public interface IGridService extends IService<Grid> {

    JSONObject mList(BaseEntity entity, JSONObject params) throws HssException;

    GridVO getList(BaseEntity entity, GridTo gridTo) throws HssException;

    List<TreeEntity> tree(GridTo gridTo) ;

    void mUpdate(JSONObject params) throws HssException;

    void add(JSONObject params) throws HssException;

    GridMessageVo delete(JSONObject params) throws HssException;

    Grid detail(JSONObject params) throws HssException;

    Map<String, Grid> getGridMap(QueryWrapper<Grid> gridQueryWrapper);

    Grid create(GridTo gridTo) throws HssException, ParseException;

    Grid update(GridTo gridTo) throws HssException, ParseException;

    Integer schedulingPlanCheck(GridTo gridTo);

    Integer checkGridList(GridTo gridTo) throws Exception;
    //通过gridid获取网格list
    List<Grid> gridIdList(List<String> gridId);

    void updateAndInsert(GridTo gridTo);

    void updateAndInsert2(GridTo gridTo);

    Map<String,List<GridPlace>> buildGridPlaceList(List<Grid> gridList);

    void initEmpWorkPointsList(Date date, List<Grid> gridList);
}
